home *** CD-ROM | disk | FTP | other *** search
/ Garbo / Garbo.cdr / mac / hypercrd / hc1_2_x / stakdoc.sit / StakDoc.sit / StakDoc v1.0 / card_4491.txt < prev    next >
Text File  |  1989-10-10  |  20KB  |  574 lines

  1. -- card: 4491 from stack: in.0
  2. -- bmap block id: 4648
  3. -- flags: 0000
  4. -- background id: 3429
  5. -- name: 
  6.  
  7.  
  8. -- part 2 (button)
  9. -- low flags: 00
  10. -- high flags: A003
  11. -- rect: left=378 top=312 right=333 bottom=495
  12. -- title width / last selected line: 0
  13. -- icon id / first selected line: 0 / 0
  14. -- text alignment: 1
  15. -- font id: 0
  16. -- text size: 12
  17. -- style flags: 0
  18. -- line height: 16
  19. -- part name: Document...
  20. ----- HyperTalk script -----
  21. on mouseUp
  22.   put the hilite of cd btn 2 into pSS
  23.  
  24.   put the hilite of cd btn 3 into pBgS
  25.   put the hilite of cd btn 4 into pBgF
  26.   put the hilite of cd btn 5 into pBgFS
  27.   put the hilite of cd btn 6 into pBgFC
  28.   put the hilite of cd btn 7 into pBgBtn
  29.   put the hilite of cd btn 8 into pBgBtnS
  30.  
  31.   put the hilite of cd btn 9 into pCdS
  32.   put the hilite of cd btn 10 into pCdF
  33.   put the hilite of cd btn 11 into pCdFS
  34.   put the hilite of cd btn 12 into pCdFC
  35.   put the hilite of cd btn 13 into pCdBtn
  36.   put the hilite of cd btn 14 into pCdBtnS
  37.  
  38.   get filename("STAK")
  39.   if it is empty then exit mouseUp
  40.   put it into theStack
  41.   get NewFileName( "Save documentation as?", "" )
  42.   if it is empty then exit mouseUp
  43.   put it into theFile
  44.   get the long name of this stack
  45.   put it into MyId
  46.   open file theFile
  47.   go first card
  48.   push this stack
  49.   lock screen
  50.   go stack theStack
  51.   write "** Stack documentation **" & return & return to file theFile
  52.   write "** Stack Name:" & tab & tab & short name of this stack to file theFile
  53.   put number of backgrounds into nBack
  54.   write return & "** Total Backgrounds:" & tab & tab & nBack & return to file theFile
  55.   write "** Total Cards:" & tab & tab & the number of cards & return to file theFile
  56.   write return to file theFile
  57.  
  58.   if pSS = true then
  59.     write "** Stack Script:" & return to file theFile
  60.     if the script of this stack is empty then
  61.       write "<Empty>" & return & return to file theFile
  62.     else
  63.       write the script of this stack & return & return to file theFile
  64.     end if
  65.   else
  66.     write return to file theFile
  67.   end if
  68.  
  69.   -- Process backgrounds
  70.   repeat with cBack = 1 to nBack
  71.     go to bg cBack
  72.     write return & "** Background # " & cBack & return to file theFile
  73.     put short name of this bg into bgName
  74.     if bgName is empty then put "<Untitled>"  into bg name
  75.     write "Bg name:" & tab & tab & bgName & return to file theFile
  76.     write "Bg id:" & tab & tab & id of this bg & return to file theFile
  77.     if pBgS = true then
  78.       write "Bg " & cBack & " Script: " & return to file theFile
  79.       if the script of this bg is empty then
  80.         write "<Empty>" & return & return to file theFile
  81.       else
  82.         write the script of this bg & return & return to file theFile
  83.       end if
  84.     else
  85.       write return to file theFile
  86.     end if
  87.  
  88.     -- Process Bg fields
  89.     put the number of bg fields into nFields
  90.     repeat with cField = 1 to nFields
  91.       if pBgF = true then
  92.         write "Bg fld # " & cField & ":" & return to file theFile
  93.         put short name of bg field cField into tempName
  94.         if tempName is empty then put "<Untitled>" into tempName
  95.         write "Bg fld Name:" & tab & tab & tempName & return & "       Id:" & tab & tab & id of fld cField & return & "       Style:" & tab & tab & style of fld cField  & return & "       Rect:" & tab & tab & rect of fld cField  & return & "       Loc:" & tab & tab & loc of fld cField  & return & "       ShowLines:" & tab & tab & showLines of fld cField  & return & "       WideMargins:" & tab & tab & widemargins of fld cField & return & "       LockText:" & tab & tab & locktext of fld cField & return & "       Visible:" & tab & tab & visible of fld cField & return & "       TextAlign:" & tab & tab & textalign of fld cField & return & "       TextFont:" & tab & tab & textfont of fld cField & return & "       TextSize:" & tab & tab & textsize of fld cField & return & "       TextStyle:" & tab & tab & textstyle of fld cField & return & "       TextHeight:" & tab & tab & textheight of fld cField & return & return to file theFile
  96.       end if
  97.       if pBgFS = true then
  98.         write "       Script: " & return to file theFile
  99.         if the script of bg fld cField is empty then
  100.           write "<Empty>" & return & return to file theFile
  101.         else
  102.           write the script of bg fld cField & return & return to file theFile
  103.         end if
  104.       else
  105.         write return to file theFile
  106.       end if
  107.       if pBgFC = true then
  108.         if the LockText of bg fld cField is true then
  109.           write "       Text:" & return & bg fld cField & return & return to file theFile
  110.         end if
  111.       end if
  112.     end repeat
  113.  
  114.     -- Process Bg buttons
  115.     if pBgBtn = true then
  116.       put the number of bg btns into nBtns
  117.       repeat with cBtn = 1 to nBtns
  118.         write "Bg btn # " & cBtn & ":" & return to file theFile
  119.         put short name of bg btn cBtn into tempName
  120.         if tempName is empty then put "<Untitled>" into tempName
  121.         write "Bg btn Name:" & tab & tab & tempName & return & "       Id:" & tab & tab & id of bg btn cBtn & return & "       Style:" & tab & tab & style of bg btn cBtn  & return & "       Rect :" & tab & tab & rect of bg btn cBtn  & return & "       Loc:" & tab & tab & loc of bg btn cBtn  & return & "       Icon:" & tab & tab & icon of bg btn cBtn & return & "       ShowName:" & tab & tab & showName of bg btn cBtn  & return & "       AutoHilite:" & tab & tab & AutoHilite of bg btn cBtn & return & "       Visible:" & tab & tab & visible of bg btn cBtn & return & "       TextAlign:" & tab & tab & textalign of bg btn cBtn & return & "       TextFont:" & tab & tab & textfont of bg btn cBtn & return & "       TextSize:" & tab & tab & textsize of bg btn cBtn & return & return to file theFile
  122.         if pBgBtnS = true then
  123.           write "       Script: " & return to file theFile
  124.           if the script of bg btn cBtn is empty then
  125.             write "<Empty>" & return & return to file theFile
  126.           else
  127.             write the script of bg btn cBtn & return & return to file theFile
  128.           end if
  129.         end if
  130.       end repeat
  131.     end if
  132.   end repeat
  133.  
  134.   --Process cards
  135.   put number of cards into nCards
  136.   repeat with cCard = 1 to nCards
  137.     go to card cCard
  138.     write return & "** Card # " & cCard & return to file theFile
  139.     put short name of this card into cardName
  140.     if cardName is empty then put "<Untitled>"  into card name
  141.     write "Cd name:" & tab & tab & cardName & return to file theFile
  142.     write "Cd id:" & tab & tab & id of this card & return to file theFile
  143.     write "Belongs to : Bg " & id of this bg & " [" & number of this bg & "]" & return to file theFile
  144.     write "Cd " & cCard & " Script: " & return to file theFile
  145.     if pCdS = true then
  146.       if the script of this card is empty then
  147.         write "<Empty>" & return & return to file theFile
  148.       else
  149.         write the script of this card & return & return to file theFile
  150.       end if
  151.     else
  152.       write return to file theFile
  153.     end if
  154.  
  155.     -- Process card fields
  156.     put the number of card fields into nFields
  157.     repeat with cField = 1 to nFields
  158.       if pCdF = true then
  159.         write "Cd fld # " & cField & ":" & return to file theFile
  160.         put short name of card field cField into tempName
  161.         if tempName is empty then put "<Untitled>" into tempName
  162.         write "Cd fld Name:" & tab & tab & tempName & return & "       Id:" & tab & tab & id of card fld cField & return & "       Style:" & tab & tab & style of card fld cField  & return & "       Rect:" & tab & tab & rect of card fld cField  & return & "       Loc:" & tab & tab & loc of card fld cField  & return & "       ShowLines:" & tab & tab & showLines of card fld cField  & return & "       WideMargins:" & tab & tab & widemargins of card fld cField & return & "       LockText:" & tab & tab & locktext of card fld cField & return & "       Visible:" & tab & tab & visible of card fld cField & return & "       TextAlign:" & tab & tab & textalign of card fld cField & return & "       TextFont:" & tab & tab & textfont of card fld cField & return & "       TextSize:" & tab & tab & textsize of card fld cField & return & "       TextStyle:" & tab & tab & textstyle of card fld cField & return & "       TextHeight:" & tab & tab & textheight of card fld cField & return & return to file theFile
  163.         if pCdFS = true then
  164.           write "       Script: " & return to file theFile
  165.           if the script of card fld cField is empty then
  166.             write "<Empty>" & return & return to file theFile
  167.           else
  168.             write the script of card fld cField & return & return to file theFile
  169.           end if
  170.         end if
  171.         if pCdFC = true then
  172.           if LockText of card fld cField is true then
  173.             write "       Text:" & return & card fld cField & return & return to file theFile
  174.           end if
  175.         end if
  176.       end if
  177.     end repeat
  178.  
  179.     -- Process card buttons
  180.     if pCdBtn = true then
  181.       put the number of card btns into nBtns
  182.       repeat with cBtn = 1 to nBtns
  183.         write "Cd btn # " & cBtn & ":" & return to file theFile
  184.         put short name of card btn cBtn into tempName
  185.         if tempName is empty then put "<Untitled>" into tempName
  186.         write "Cd btn Name:" & tab & tab & tempName & return & "       Id:" & tab & tab & id of card btn cBtn & return & "       Style:" & tab & tab & style of card btn cBtn  & return & "       Rect:" & tab & tab & rect of card btn cBtn  & return & "       Loc:" & tab & tab & loc of card btn cBtn  & return & "       Icon:" & tab & tab & icon of card btn cBtn & return & "       ShowName:" & tab & tab & showName of card btn cBtn  & return & "       AutoHilite:" & tab & tab & AutoHilite of card btn cBtn & return & "       Visible:" & tab & tab & visible of card btn cBtn & return & "       TextAlign:" & tab & tab & textalign of card btn cBtn & return & "       TextFont:" & tab & tab & textfont of card btn cBtn & return & "       TextSize:" & tab & tab & textsize of card btn cBtn & return & return to file theFile
  187.         if pCdBtnS = true then
  188.           write "       Script: " & return to file theFile
  189.           if the script of card btn cBtn is empty then
  190.             write "<Empty>" & return & return to file theFile
  191.           else
  192.             write the script of card btn cBtn & return & return to file theFile
  193.           end if
  194.         end if
  195.       end repeat
  196.     end if
  197.   end repeat
  198.   close file theFile
  199.   unlock screen
  200.   pop card
  201.   --  go stack MyId
  202. end mouseUp
  203.  
  204.  
  205.  
  206. -- part 7 (button)
  207. -- low flags: 00
  208. -- high flags: E006
  209. -- rect: left=181 top=81 right=96 bottom=322
  210. -- title width / last selected line: 0
  211. -- icon id / first selected line: 0 / 0
  212. -- text alignment: 1
  213. -- font id: 0
  214. -- text size: 12
  215. -- style flags: 0
  216. -- line height: 16
  217. -- part name: Script
  218.  
  219.  
  220. -- part 9 (button)
  221. -- low flags: 00
  222. -- high flags: E006
  223. -- rect: left=47 top=153 right=168 bottom=188
  224. -- title width / last selected line: 0
  225. -- icon id / first selected line: 0 / 0
  226. -- text alignment: 1
  227. -- font id: 0
  228. -- text size: 12
  229. -- style flags: 0
  230. -- line height: 16
  231. -- part name: Script
  232.  
  233.  
  234. -- part 10 (button)
  235. -- low flags: 00
  236. -- high flags: E006
  237. -- rect: left=47 top=173 right=188 bottom=188
  238. -- title width / last selected line: 0
  239. -- icon id / first selected line: 0 / 0
  240. -- text alignment: 1
  241. -- font id: 0
  242. -- text size: 12
  243. -- style flags: 0
  244. -- line height: 16
  245. -- part name: Fields
  246. ----- HyperTalk script -----
  247. on mouseUp
  248.   get the hilite of me
  249.   if it is false then
  250.     set the hilite of cd button 5 to false
  251.     set the hilite of cd button 6 to false
  252.   end if
  253. end mouseUp
  254.  
  255.  
  256.  
  257. -- part 11 (button)
  258. -- low flags: 00
  259. -- high flags: E005
  260. -- rect: left=63 top=193 right=208 bottom=204
  261. -- title width / last selected line: 0
  262. -- icon id / first selected line: 0 / 0
  263. -- text alignment: 1
  264. -- font id: 0
  265. -- text size: 12
  266. -- style flags: 0
  267. -- line height: 16
  268. -- part name: Script
  269. ----- HyperTalk script -----
  270. on mouseUp
  271.   get the hilite of me
  272.   if it is true then set the hilite of cd btn 4 to true
  273. end mouseUp
  274.  
  275.  
  276.  
  277. -- part 16 (button)
  278. -- low flags: 00
  279. -- high flags: E005
  280. -- rect: left=63 top=213 right=228 bottom=204
  281. -- title width / last selected line: 0
  282. -- icon id / first selected line: 0 / 0
  283. -- text alignment: 1
  284. -- font id: 0
  285. -- text size: 12
  286. -- style flags: 0
  287. -- line height: 16
  288. -- part name: Contents if locked
  289. ----- HyperTalk script -----
  290. on mouseUp
  291.   get the hilite of me
  292.   if it is true then set the hilite of cd btn 4 to true
  293. end mouseUp
  294.  
  295.  
  296.  
  297. -- part 17 (button)
  298. -- low flags: 00
  299. -- high flags: E006
  300. -- rect: left=47 top=233 right=248 bottom=188
  301. -- title width / last selected line: 0
  302. -- icon id / first selected line: 0 / 0
  303. -- text alignment: 1
  304. -- font id: 0
  305. -- text size: 12
  306. -- style flags: 0
  307. -- line height: 16
  308. -- part name: Buttons
  309. ----- HyperTalk script -----
  310. on mouseUp
  311.   if the hilite of me is false then set the hilite of cd btn 8 to false
  312. end mouseUp
  313.  
  314.  
  315.  
  316. -- part 18 (button)
  317. -- low flags: 00
  318. -- high flags: E005
  319. -- rect: left=63 top=253 right=268 bottom=204
  320. -- title width / last selected line: 0
  321. -- icon id / first selected line: 0 / 0
  322. -- text alignment: 1
  323. -- font id: 0
  324. -- text size: 12
  325. -- style flags: 0
  326. -- line height: 16
  327. -- part name: Script
  328. ----- HyperTalk script -----
  329. on mouseUp
  330.   if the hilite of me is true then set the hilite of cd btn 7 to true
  331. end mouseUp
  332.  
  333.  
  334.  
  335. -- part 20 (button)
  336. -- low flags: 00
  337. -- high flags: E006
  338. -- rect: left=305 top=153 right=168 bottom=446
  339. -- title width / last selected line: 0
  340. -- icon id / first selected line: 0 / 0
  341. -- text alignment: 1
  342. -- font id: 0
  343. -- text size: 12
  344. -- style flags: 0
  345. -- line height: 16
  346. -- part name: Script
  347.  
  348.  
  349. -- part 28 (button)
  350. -- low flags: 00
  351. -- high flags: E006
  352. -- rect: left=305 top=173 right=188 bottom=446
  353. -- title width / last selected line: 0
  354. -- icon id / first selected line: 0 / 0
  355. -- text alignment: 1
  356. -- font id: 0
  357. -- text size: 12
  358. -- style flags: 0
  359. -- line height: 16
  360. -- part name: Fields
  361. ----- HyperTalk script -----
  362. on mouseUp
  363.   get the hilite of me
  364.   if it is false then
  365.     set the hilite of cd button 11 to false
  366.     set the hilite of cd button 12 to false
  367.   end if
  368. end mouseUp
  369.  
  370.  
  371.  
  372. -- part 29 (button)
  373. -- low flags: 00
  374. -- high flags: E005
  375. -- rect: left=321 top=193 right=208 bottom=462
  376. -- title width / last selected line: 0
  377. -- icon id / first selected line: 0 / 0
  378. -- text alignment: 1
  379. -- font id: 0
  380. -- text size: 12
  381. -- style flags: 0
  382. -- line height: 16
  383. -- part name: Script
  384. ----- HyperTalk script -----
  385. on mouseUp
  386.   get the hilite of me
  387.   if it is true then set the hilite of cd btn 10 to true
  388. end mouseUp
  389.  
  390.  
  391.  
  392. -- part 30 (button)
  393. -- low flags: 00
  394. -- high flags: E005
  395. -- rect: left=321 top=213 right=228 bottom=462
  396. -- title width / last selected line: 0
  397. -- icon id / first selected line: 0 / 0
  398. -- text alignment: 1
  399. -- font id: 0
  400. -- text size: 12
  401. -- style flags: 0
  402. -- line height: 16
  403. -- part name: Contents if locked
  404. ----- HyperTalk script -----
  405. on mouseUp
  406.   get the hilite of me
  407.   if it is true then set the hilite of cd btn 10 to true
  408. end mouseUp
  409.  
  410.  
  411.  
  412. -- part 32 (button)
  413. -- low flags: 00
  414. -- high flags: E006
  415. -- rect: left=305 top=233 right=248 bottom=446
  416. -- title width / last selected line: 0
  417. -- icon id / first selected line: 0 / 0
  418. -- text alignment: 1
  419. -- font id: 0
  420. -- text size: 12
  421. -- style flags: 0
  422. -- line height: 16
  423. -- part name: Buttons
  424. ----- HyperTalk script -----
  425. on mouseUp
  426.   if the hilite of me is false then set the hilite of cd btn 14 to false
  427. end mouseUp
  428.  
  429.  
  430.  
  431. -- part 33 (button)
  432. -- low flags: 00
  433. -- high flags: E005
  434. -- rect: left=323 top=253 right=268 bottom=464
  435. -- title width / last selected line: 0
  436. -- icon id / first selected line: 0 / 0
  437. -- text alignment: 1
  438. -- font id: 0
  439. -- text size: 12
  440. -- style flags: 0
  441. -- line height: 16
  442. -- part name: Script
  443. ----- HyperTalk script -----
  444. on mouseUp
  445.   if the hilite of me is true then set the hilite of cd btn 13 to true
  446. end mouseUp
  447.  
  448.  
  449.  
  450. -- part 34 (button)
  451. -- low flags: 00
  452. -- high flags: A003
  453. -- rect: left=276 top=313 right=335 bottom=375
  454. -- title width / last selected line: 0
  455. -- icon id / first selected line: 0 / 0
  456. -- text alignment: 1
  457. -- font id: 0
  458. -- text size: 12
  459. -- style flags: 0
  460. -- line height: 16
  461. -- part name: Select All
  462. ----- HyperTalk script -----
  463. on mouseUp
  464.   repeat with n = 2 to 14
  465.     set the hilite of cd button n to true
  466.   end repeat
  467. end mouseUp
  468.  
  469.  
  470.  
  471. -- part 35 (button)
  472. -- low flags: 00
  473. -- high flags: 0000
  474. -- rect: left=237 top=305 right=339 bottom=274
  475. -- title width / last selected line: 0
  476. -- icon id / first selected line: 2507 / 2507
  477. -- text alignment: 1
  478. -- font id: 0
  479. -- text size: 12
  480. -- style flags: 0
  481. -- line height: 16
  482. -- part name: 
  483. ----- HyperTalk script -----
  484. on mouseUp
  485.   show card field 1
  486. end mouseUp
  487.  
  488.  
  489.  
  490. -- part 36 (button)
  491. -- low flags: 00
  492. -- high flags: 0000
  493. -- rect: left=196 top=305 right=339 bottom=233
  494. -- title width / last selected line: 0
  495. -- icon id / first selected line: 1011 / 1011
  496. -- text alignment: 1
  497. -- font id: 0
  498. -- text size: 12
  499. -- style flags: 0
  500. -- line height: 16
  501. -- part name: 
  502. ----- HyperTalk script -----
  503. on mouseUp
  504.   go home
  505. end mouseUp
  506.  
  507.  
  508.  
  509. -- part 37 (field)
  510. -- low flags: 81
  511. -- high flags: 0007
  512. -- rect: left=143 top=100 right=298 bottom=512
  513. -- title width / last selected line: 0
  514. -- icon id / first selected line: 0 / 0
  515. -- text alignment: 0
  516. -- font id: 22
  517. -- text size: 12
  518. -- style flags: 0
  519. -- line height: 16
  520. -- part name: 
  521. ----- HyperTalk script -----
  522. on mouseup
  523.   hide me
  524. end mouseup
  525.  
  526.  
  527. -- part contents for card part 37
  528. ----- text -----
  529. To document a HyperCard stack simply select the options you wish to document.
  530.  
  531. You may choose to include the stack script, background script, background field information, with or without script or contents. You may also choose to include button information, with or without its script.
  532.  
  533. StakDoc works on locked and protected stacks.
  534.  
  535. The options available for background item documentation are duplicated for each foreground card. You may select any or all of the individual items for documentation.
  536.  
  537. When you have selected the options, click on the Document... button and select the stack you wish to document.
  538.  
  539. After directing StakDoc to the stack and naming the resulting text file there will be a slight delay, longer for large stacks, while StakDoc does its job of ripping apart the stack. When the job is complete you will return to the start of this stack to document another stack if you so wish.
  540.  
  541. The file produced by StakDoc is a standard text file. It may be opened in any word processor. To format the document correctly you will need to put a tab stop at about 5-6cm so that the columns line up correctly.
  542.  
  543. The output of StakDoc is very comprehensive and should provide more than enough documentation about a stack to reconstruct it, for example;
  544.  
  545. Bg fld # 1:
  546. Bg fld Name:       Any Field
  547.        Id:         3
  548.        Style:      transparent
  549.        Rect:       0,70,364,342
  550.        Loc:        182,206
  551.        ShowLines:  false
  552.        WideMargins:false
  553.        LockText:   false
  554.        Visible:    true
  555.        TextAlign:  left
  556.        TextFont:   Geneva
  557.        TextSize:   9
  558.        TextStyle:  plain
  559.        TextHeight: 12
  560.  
  561.        Script: 
  562.    <Empty>
  563.  
  564. This application is distributed under the honour system, it is not public domain. You may freely use it and distribute it provided that you agree not to sell it for profit or use it to induce anyone to buy something.
  565.  
  566. Don't send me any money, bug reports, life stories or claims for compensation. I don't want them. If you like this product and use it then you might consider donating a few loose coins to the collection box of a worthy charity. Kids are usually a better investment than cats and dogs.
  567.  
  568. Rick Mather
  569. Nautical Village,
  570. 57 Empire Bay Drive,
  571. Kincumber,
  572. NSW 2250 AUSTRALIA
  573.  
  574.